package io.github.talelin.latticy.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import io.github.talelin.latticy.bo.InboundOrderDetailsVo;
import io.github.talelin.latticy.bo.InboundOrderPageVo;
import io.github.talelin.latticy.bo.InboundOrderSkuVo;
import io.github.talelin.latticy.dto.feign.InboundOrderPageDTO;
import io.github.talelin.latticy.dto.receving.ReceivingRecordDTO;
import io.github.talelin.latticy.dto.receving.ReceivingRecordSkuDTO;
import io.github.talelin.latticy.model.ReceivingRecordDO;
import com.baomidou.mybatisplus.extension.service.IService;
import io.github.talelin.latticy.vo.PageResponseVO;
import io.github.talelin.latticy.vo.ReceivingRecordBySkuVO;
import io.github.talelin.latticy.vo.ReceivingRecordVO;

import java.util.List;

/**
 * <p>
 * 入库收货记录表 服务类
 * </p>
 *
 * @author generator@wulongbo
 * @since 2022-07-20
 */
public interface ReceivingRecordService extends IService<ReceivingRecordDO> {

    /**
     * 创建入库收货记录
     *
     * @param recordCreate
     */
    void createReceivingRecord(ReceivingRecordDTO recordCreate);


    void createReceivingSkuRecord(ReceivingRecordSkuDTO recordCreate);

    /**
     * 重做入库收货记录
     *
     * @param ids
     */
    boolean redoReceivingRecord(Long[] ids);

    /**
     * 查询收货记录列表
     *
     * @param inboundOrderNo
     * @return
     */
    IPage<ReceivingRecordVO> getReceivingRecordPage(String inboundOrderNo, Integer count, Integer page);

    /**
     * 根据入库单查询收货记录列表
     * @param inboundOrderNo
     * @return
     */
    ReceivingRecordVO getReceivingRecordList(String inboundOrderNo);

    /**
     * 查询入库单列表
     *
     * @param inboundOrderNo
     * @return
     */
    PageResponseVO<InboundOrderPageVo> getInboundOrder(InboundOrderPageDTO inboundOrderNo);

    /**
     * 获取入库单详情
     * @param inboundOrderNo
     * @return
     */
    InboundOrderDetailsVo getInboundOrderByNo(String inboundOrderNo);

    /**
     * 获取入库单详情sku信息
     * @param inboundOrderNo
     * @return
     */
    InboundOrderSkuVo getInboundOrderSkuByNo(String inboundOrderNo);

    /**
     * 根据入库单查询sku相关收货记录汇总
     * @param inboundOrderNo
     * @return
     */
    ReceivingRecordBySkuVO getBySkuReceivingRecord(String inboundOrderNo);
}
